package 排序和算法;

import java.lang.reflect.Array;

/**
 * @author:zhengyilong
 * @email:1797344574@qq.com
 * @phone:13479394730
 * @desc:
 * @DateTime:2022/3/27 15:37
 **/
public class Demo1 {
    public static void main(String[] args) {

        int[] arr = new int[]{10,1,35,61,89,36,55};
        int sum;

        for (int i = 0;i<arr.length;i++){
            for (int j = 0;j<i;j++){
                if (arr[j]>arr[i]){
                    sum = arr[i];
                    arr[i]=arr[j];
                    arr[j]=sum;
                }
            }
        }

        for (int i = 0;i<arr.length;i++){
            System.out.println(arr[i]);
        }

    }
}

